package com.grace.cms.forum.user.mapper;

import org.apache.ibatis.annotations.Param;

import com.grace.cms.common.domain.entity.CmsLookRecord;
import com.grace.cms.common.model.param.WebRecordParam;

public interface HandRecordMapper {
        /**
         * 通用插入记录表
         * 
         * @return
         */
        int insertRecord(WebRecordParam recordParam);

        /**
         * 更新记录
         * 
         * @return
         */
        int updateCmsRecord(WebRecordParam recordParam);

        /**
         * 更新记录统计
         * 
         * @param countColumn
         * @param recordId
         * @return
         */
        int updateCmsRecordCount(@Param("countColumn") String countColumn, @Param("recordId") String recordId,
                        @Param("themeName") String themeName, @Param("onlyCode") String onlyCode);

        /**
         * 查询记录状态
         * 
         * @param recordTable 记录的表
         * @param recordId    记录id
         * @param createBy    创建人
         * @return
         */
        Integer selectRecordVisible(@Param("recordTable") String recordTable, @Param("recordId") String recordId,
                        @Param("createBy") String createBy);

        /**
         * 更新用户浏览记录
         * 
         * @param lookRecord
         * @return
         */
        int updateCmsLookRecord(CmsLookRecord lookRecord);
}
